package com.dao;

import com.entity.MeishiEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.entity.view.MeishiView;
import org.apache.ibatis.annotations.Select;

/**
 * 健康食谱 Dao 接口
 *
 * @author 
 */
@Mapper
public interface MeishiDao extends BaseMapper<MeishiEntity> {

   List<MeishiView> selectListView(Pagination page,@Param("params")Map<String,Object> params);

   /**
    * 查询美食赞的数量
    * @return 美食ID和收藏数量的映射列表
    */
   @Select("SELECT id as meishi_id, zan_number as zan_count FROM meishi")
   List<Map<String, Object>> selectMeishiZanCounts();
}
